html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;

  body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #bec2c7;

    .title {
      line-height: 50px;
      color: #344966;
      font-size: 20px;
      font-weight: bold;
      text-align: center;
    }

    .clear {
      overflow: hidden;
      padding: 30px;

      .sinBlock {
        float: left;
        // 设置宽高
        width: 150px;
        height: 150px;
        margin-right: 50px;
        margin-bottom: 50px;
        position: relative;
        border: 1px solid rgba(52, 73, 102, 0.3);
      }
    }
  }

}

.demo1 {
  position: absolute;
  width: 70px;
  height: 70px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  div {
    width: 10px;
    height: 10px;
    background: #344966;
    position: absolute;
    opacity: 0;
    animation: demo1 1.7s linear infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      left: 20px;
      top: 0;
      animation-delay: -1.5s
    }

    &:nth-child(2) {
      left: 30px;
      top: 0;
      animation-delay: -1.4s;
    }

    &:nth-child(3) {
      left: 40px;
      top: 0;
      animation-delay: -1.3s
    }

    &:nth-child(4) {
      left: 50px;
      top: 10px;
      animation-delay: -1.2s;
    }

    &:nth-child(5) {
      left: 60px;
      top: 20px;
      animation-delay: -1.1s;
    }

    &:nth-child(6) {
      left: 60px;
      top: 30px;
      animation-delay: -1.0s;
    }

    &:nth-child(7) {
      left: 60px;
      top: 40px;
      animation-delay: -0.9s;
    }

    &:nth-child(8) {
      left: 50px;
      top: 50px;
      animation-delay: -0.8s;
    }

    &:nth-child(9) {
      left: 40px;
      top: 60px;
      animation-delay: -0.7s;
    }

    &:nth-child(10) {
      left: 30px;
      top: 60px;
      animation-delay: -0.6s;
    }

    &:nth-child(11) {
      left: 20px;
      top: 60px;
      animation-delay: -0.5s;
    }

    &:nth-child(12) {
      left: 10px;
      top: 50px;
      animation-delay: -0.4s;
    }

    &:nth-child(13) {
      left: 0px;
      top: 40px;
      animation-delay: -0.3s;
    }

    &:nth-child(14) {
      left: 0px;
      top: 30px;
      animation-delay: -0.2s;
    }

    &:nth-child(15) {
      left: 0px;
      top: 20px;
      animation-delay: -0.1s;
    }

    &:nth-child(16) {
      left: 10px;
      top: 10px;
      animation-delay: -0s;
    }
  }

  @keyframes demo1 {
    0% {
      opacity: 1;
    }

    50% {
      opacity: 1;
    }

    51% {
      opacity: 0;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo2 {
  position: absolute;
  width: 60px;
  height: 60px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  div {
    &:nth-child(1) {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) scale(1, 1);
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #000;
      animation: demo2_1 2s linear infinite;
      animation-play-state: paused;
      z-index: 1;
    }

    &:nth-child(2),
    &:nth-child(3),
    &:nth-child(4) {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      animation: demo2_4 2s linear infinite;
      animation-play-state: paused;

      &::before {
        position: absolute;
        top: 0;
        left: 0;
        width: 30px;
        height: 30px;
        content: "";
        background: #344966;
        border-radius: 50%;
        opacity: 0.6;
        animation: demo2_2 2s linear infinite, demo2_3 2s linear infinite;
        animation-play-state: paused;
      }
    }

    &:nth-child(2) {
      transform: rotate(0deg);

      &::before {
        animation-delay: 0s, -1.125s;
      }
    }

    &:nth-child(3) {
      transform: rotate(120deg);

      &::before {
        animation-delay: -1s, -0.75s;
      }
    }

    &:nth-child(4) {
      transform: rotate(240deg);

      &::before {
        animation-delay: -0.5s, -0.125s;
      }
    }
  }

  @keyframes demo2_1 {
    50% {
      transform: translate(-50%, -50%) scale(0.8, 0.8);
    }
  }

  @keyframes demo2_2 {
    50% {
      top: 100%;
      left: 100%;
    }
  }

  @keyframes demo2_3 {
    50% {
      transform: scale(0.5, 0.5);
    }
  }

  @keyframes demo2_4 {
    50% {
      z-index: 10;
    }
  }

  &.active {
    div {
      animation-play-state: running;

      &::before {
        animation-play-state: running;

      }
    }
  }
}

.demo3 {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;

  div {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #344966;
    opacity: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: demo3 1s ease-in-out infinite;
    animation-play-state: paused;

    // 最左边的点
    &:nth-child(1) {
      margin-left: -30px;
      animation-delay: -0.4s;
    }

    // 中间的点
    &:nth-child(2) {
      margin-left: 0;
      animation-delay: 0s;
    }

    // 最右边的点
    &:nth-child(3) {
      margin-left: 30px;
      animation-delay: -0.4s;
    }
  }

  // 透明度的渐变
  @keyframes demo3 {
    0% {
      width: 20px;
      height: 20px;
      opacity: 1;
    }

    50% {
      width: 15px;
      height: 15px;
      opacity: 0.3;
    }

    100% {
      width: 20px;
      height: 20px;
      opacity: 1;
    }

  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo4 {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;

  div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1, 1);
    margin-left: 30px;
    width: 30px;
    height: 30px;
    background: rgba(52, 73, 102, 0.3);
    border-radius: 50%;
    animation: demo4_1 2.5s linear infinite, demo4_2 2.5s linear infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      animation-delay: 0s, -0.5s;
    }

    &:nth-child(2) {
      animation-delay: -0.5s, -1s;
    }

    &:nth-child(3) {
      animation-delay: -1s, -1.5s;
    }

    &:nth-child(4) {
      animation-delay: -1.5s, -2s;
    }

    &:nth-child(5) {
      animation-delay: -2s, -2.5s;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }

  // 延时的时间差，控制元素并不是在最左边或者最前面的时候最大最小
  // 第一个动画，控制元素的横向位移
  @keyframes demo4_1 {
    0% {
      margin-left: 30px;
    }

    50% {
      margin-left: -30px;
    }

    100% {
      margin-left: 30px;
    }
  }

  // 第二个动画，控制动画的缩放
  @keyframes demo4_2 {
    0% {
      transform: translate(-50%, -50%) scale(1, 1);
    }

    50% {
      transform: translate(-50%, -50%) scale(0.3, 0.3);
    }

    100% {
      transform: translate(-50%, -50%) scale(1, 1);
    }
  }
}

.demo5 {
  position: absolute;
  width: 120px;
  height: 120px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  div {
    position: absolute;


    &:nth-child(1) {
      width: 40px;
      height: 5px;
      background: #344966;
      opacity: 0.3;
      left: 80px;
      top: 70px;
      animation: demo5_1 2.1s linear infinite;
      animation-delay: 0s;
      animation-play-state: paused;
    }

    &:nth-child(2) {
      width: 40px;
      height: 5px;
      background: #344966;
      opacity: 1;
      left: 40px;
      top: 90px;
      animation: demo5_1 2.1s linear infinite;
      // 延时为负值，表示在整个动画中，动画立即执行，并且是从第0.7秒开始执行
      animation-delay: -0.7s;
      animation-play-state: paused;
    }

    &:nth-child(3) {
      width: 40px;
      height: 5px;
      background: #344966;
      opacity: 0.3;
      left: 0px;
      top: 110px;
      animation: demo5_1 2.1s linear infinite;
      animation-delay: -1.4s;
      animation-play-state: paused;
    }

    &:nth-child(4) {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: #344966;
      left: 50%;
      transform: translateX(-50%);
      top: 0;
      animation: demo5_2 0.7s linear infinite;
      animation-play-state: paused;
    }
  }

  @keyframes demo5_1 {
    0% {
      opacity: 0.3;
      left: 80px;
      top: 70px;
    }

    50% {
      opacity: 1;
      left: 40px;
      top: 90px;
    }

    100% {
      opacity: 0.3;
      left: 0px;
      top: 110px;
    }
  }

  @keyframes demo5_2 {

    // 0-20和80-100对称，分别是由扁变长由长变扁的形变
    // 20-40和60-80对称，变回到正常的形状
    // 50中间值改变上下的位置
    0% {
      transform: translateX(-50%) scale(1, 0.7);
    }

    20% {
      transform: translateX(-50%) scale(0.7, 1.2);
    }

    40% {
      transform: translateX(-50%) scale(1, 1);
    }

    50% {
      top: 60px;
    }

    60% {
      transform: translateX(-50%) scale(1, 1);
    }

    80% {
      transform: translateX(-50%) scale(0.7, 1.2);
    }

    100% {
      transform: translateX(-50%) scale(1, 0.7);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }

}

.demo6 {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;

  div {
    width: 100px;
    height: 100px;
    border: 4px solid #344966;
    border-bottom: 4px solid transparent;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    animation: demo6 1s linear infinite;
    animation-play-state: paused;
  }

  @keyframes demo6 {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo7 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  div {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(0deg);


    &:nth-child(1) {
      width: 100px;
      height: 100px;
      border-top: 4px solid #344966;
      border-right: 4px solid transparent;
      border-bottom: 4px solid #344966;
      border-left: 4px solid transparent;
      border-radius: 50%;
      animation: demo7_1 1s ease-in-out infinite;
      animation-play-state: paused;
    }

    &:nth-child(2) {
      width: 50px;
      height: 50px;
      border-top: 4px solid transparent;
      border-right: 4px solid #344966;
      border-bottom: 4px solid transparent;
      border-left: 4px solid #344966;
      border-radius: 50%;
      animation: demo7_2 1s ease-in-out infinite;
      animation-play-state: paused;
    }
  }

  @keyframes demo7_1 {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  @keyframes demo7_2 {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
      transform: translate(-50%, -50%) rotate(-360deg);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo8 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  div {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(0deg);


    &:nth-child(1) {
      width: 100px;
      height: 100px;
      border-top: 4px solid #344966;
      border-right: 4px solid transparent;
      border-bottom: 4px solid #344966;
      border-left: 4px solid transparent;
      border-radius: 50%;
      animation: demo8_1 1s ease-in-out infinite;
      animation-play-state: paused;
    }

    &:nth-child(2) {
      width: 50px;
      height: 50px;
      background: #344966;
      opacity: 1;
      transform: translate(-50%, -50%) scale(1, 1);
      border-radius: 50%;
      animation: demo8_2 1s ease-in-out infinite;
      animation-play-state: paused;
    }
  }

  @keyframes demo8_1 {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  @keyframes demo8_2 {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1, 1);
    }

    50% {
      opacity: 0.3;
      transform: translate(-50%, -50%) scale(0.3, 0.3);
    }

    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1, 1);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo9 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  div {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 15px;
    height: 15px;
    background: #344966;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1, 1);

    &:nth-child(1) {
      margin-left: -30px;
      animation: demo9_1 1s linear infinite, demo9_6 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(2) {
      margin-left: -15px;
      animation: demo9_2 1s linear infinite, demo9_6 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(3) {
      margin-left: 0;
      animation: demo9_3 1s linear infinite, demo9_6 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(4) {
      margin-left: 15px;
      animation: demo9_4 1s linear infinite, demo9_6 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(5) {
      margin-left: 30px;
      animation: demo9_5 1s linear infinite, demo9_6 1s linear infinite;
      animation-play-state: paused;
    }
  }

  @keyframes demo9_1 {
    50% {
      margin-left: -60px;
    }
  }

  @keyframes demo9_2 {
    50% {
      margin-left: -30px;
    }
  }

  @keyframes demo9_3 {
    50% {
      margin-left: 0;
    }
  }

  @keyframes demo9_4 {
    50% {
      margin-left: 30px;
    }
  }

  @keyframes demo9_5 {
    50% {
      margin-left: 60px;
    }
  }

  @keyframes demo9_6 {
    50% {
      transform: translate(-50%, -50%) scale(0.7, 0.7);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo10 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  div {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    opacity: 1;
    transform: translate(-50%, -50%);
    animation: demo10 1s linear infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      margin-left: -30px;
      animation-delay: -0.2s;
    }

    &:nth-child(2) {
      animation-delay: -0.1s;
    }

    &:nth-child(3) {
      margin-left: 30px;
      animation-delay: 0s;
    }
  }

  @keyframes demo10 {
    0% {
      margin-top: -60px;
      opacity: 0;
    }

    40% {
      margin-top: 0;
      opacity: 1;
    }

    60% {
      margin-top: 0;
      opacity: 1;
    }

    100% {
      margin-top: 60px;
      opacity: 0;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}